<style type="text/css">
.tableframe2{WORD-BREAK: break-all;border-spacing:2px;}
.tableframe2 tr{BACKGROUND-COLOR: #dae2ed;height:37px; line-height:30px;}
.tableframe2 tr td{text-align:center;}
.tableframe2 tr td input{text-align:center;background-color:#dae2ed;}
.tableframe2 a {color:#000000; line-height:30px;}
.tableframe2 a:hover {color:#FF9900; text-decoration:underline;}
.MC{width:435px;}
.DJ{width:205px;}
#id1 td b{line-height:30px;}
</style>
<div class="page">
	<div>
		<table class="tableframe2" width="97%" align="center" height="87">
		    <tbody>
		      <tr id="id1">
		        <td width="15%" >
		          <p align="center"><b>编号</b></p>
		        </td>
		        <td  width="31%"><b>详细信息</b></td>
		        <td  width="14%"><b>出库途径</b></td>
		        <td  width="15%"><b>邮发给</b></td>
		        <td  width="15%"><b>发行员</b></td>
		      </tr>
		      <volist id="vo" name="list">
		      <tr>
		        <td   width="15%"><input type="text" id="BH{$key+1}" value="{$vo.id}"  readonly=true></td> 
		        <td   width="31%"><input type="text" class="MC" id="MC{$key+1}" value="刊名：{$vo.postCode|get_magazine_name}  起期：{$vo.beginTermID|get_magazine_terrm_name}   止期：{$vo.endTermID|get_magazine_terrm_name}   份数：{$vo.quantity}"  readonly=true></td>
		        <td   width="14%"><input type="text" id="SL{$key+1}" value="{$vo.sendGoodsTypeID|get_send_goods_type_name}" readonly=true></td>
		        <td   width="15%"><input type="text" class="DJ" id="DJ{$key+1}" value="{$vo.recAddress}" readonly=true></td>
		        <td   width="15%"><input type="text" id="CN{$key+1}" value="{$vo.postPeople|get_employee_name}" readonly=true></td>
		      </tr>
		      </volist>
		      <tr>
		      	<td colspan="5">
		      	{$page}
		      	</td>
		      </tr> 
		    </tbody>
	    </table>
		<p style="height:35px; line-height:30px; margin-left:20px;">设计出自己的预览界面：</p>
		<table border="1" width="100%" class="tableframe2">
		  <tr>
		    <td width="9%" align="center"><a href="javascript:myheight100()">适高显示</a></td>
		    <td width="10%" align="center"><a href="javascript:myNormal()">正常显示</a></td>
		    <td width="9%" align="center"><a href="javascript:myWidth100()">适宽显示</a></td>
		    <td width="6%" align="center"><a href="javascript:myFirstPage()">首页</a></td>
		    <td width="7%" align="center"><a href="javascript:myPreviPage()">上一页</a></td>
		    <td width="7%" align="center"><a href="javascript:myNextPage()">下一页</a></td>
		    <td width="6%" align="center"><a href="javascript:myLastPage()">尾页</a></td>
		    <td width="10%" align="center"><a href="javascript:myPrintOne()">打印本页</a></td>
		    <td width="9%" align="center"><a href="javascript:myPrintAll()">打印全部</a></td>
		    <td width="18%" align="center"><a href="javascript:myPrintSetup()">打印维护</a></td>
		  </tr>
		</table>
	</div>

	
	<script src="__PUBLIC__/Printer/PrintFuncs2.js" type="text/javascript"></script>
	
	<object id="LVOAPRINTER" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" > 
		<embed id="LVOAPRINTER_EM" type="application/x-print-LVOAPRINTER" pluginspage="__PUBLIC__/Printer/InstallPrinter.exe"></embed>
	</object> 
	
 
	<script language="javascript" type="text/javascript">   
 
 	    //  ADD_PRINT_SHAPE (intShapeType,intTop,intLeft,intWidth,intHeight,intLineStyle,intLineWidth,intColor)
		 // ADD_PRINT_TEXT(intTop,intLeft,intWidth,intHeight,strContent)
		/*var LVOAPRINTER; //声明为全局变量
	    	iMinPageNO=1;    
	    	iMaxPageNO=3; //共演示3页
	    	iWindowMode=0;//首先按"适高"显示
		
		iCurPageNO=4;
	    	if (navigator.appVersion.indexOf("MSIE")>=0) myFirstPage();
	
		function myFirstPage(){	
	        	iCurPageNO=iMinPageNO;
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PREVIEW();	
		};	
		function myPreviPage(){	
	        	iCurPageNO=iCurPageNO-1;
	        	if (iCurPageNO<iMinPageNO)  iCurPageNO=iMinPageNO;
			addtable(iCurPageNO,iWindowMode);	
			LVOAPRINTER.PREVIEW();	
		};		
		function myNextPage(){	
	        	iCurPageNO=iCurPageNO+1;
	        	if (iCurPageNO>iMaxPageNO)  iCurPageNO=iMaxPageNO;
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PREVIEW();
		};	
		function myLastPage(){	
	        	iCurPageNO=iMaxPageNO;
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PREVIEW();
		};	
	
		function myheight100(){	
	         	iWindowMode=0;
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PREVIEW();
		};		
		function myNormal(){	
	        	iWindowMode=1;
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PREVIEW();
		};
		function myWidth100(){	
	         	iWindowMode=2;
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PREVIEW();
		};	
		function myPrintOne(){	
			addtable(iCurPageNO,iWindowMode);
			if (LVOAPRINTER.PRINT()) alert("打印成功！");
		};
		function myPrintAll(){	
			for(var i=iMinPageNO;i<=iMaxPageNO;i++){
				addtable(i,iWindowMode);
				LVOAPRINTER.PRINT();
			};
			alert("打印完毕！");
		};
		function myPrintSetup(){	
			addtable(iCurPageNO,iWindowMode);
			LVOAPRINTER.PRINT_SETUP();
		};*/								
	  	 
              //打印表格
        function addtable(offsetTop,iWindowMode){
           	/*LVOAPRINTER=getLodop(document.getElementById('LVOAPRINTER'),document.getElementById('LVOAPRINTER_EM'));*/
           	/*strBH=document.getElementById("BH"+iPageNO).value;
		   	strMC=document.getElementById("MC"+iPageNO).value;
			strSL=document.getElementById("SL"+iPageNO).value;
			strDJ=document.getElementById("DJ"+iPageNO).value;
			strCN=document.getElementById("CN"+iPageNO).value;*/
           	  
		      LVOAPRINTER.ADD_PRINT_SHAPE(2,10+offsetTop,43,700,250,0,2,"#000000");//外框
			  LVOAPRINTER.ADD_PRINT_SHAPE(1,50+offsetTop,44,700,1,0,1,"#000000"); //横线
			  LVOAPRINTER.ADD_PRINT_SHAPE(1,90+offsetTop,44,700,1,0,1,"#000000"); //横线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,100,1,40,0,1,"#000000"); //竖线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,300,1,40,0,1,"#000000"); //竖线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,350,1,40,0,1,"#000000"); //竖线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,450,1,40,0,1,"#000000"); //竖线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,520,1,40,0,1,"#000000"); //竖线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,600,1,40,0,1,"#000000"); //竖线
			  LVOAPRINTER.ADD_PRINT_SHAPE(0,50+offsetTop,630,1,40,0,1,"#000000"); //竖线
			   LVOAPRINTER.SET_PRINT_STYLE("FontSize",20);
	           LVOAPRINTER.ADD_PRINT_TEXT(20+offsetTop,350,200,25,"出库单");
			  LVOAPRINTER.SET_PRINT_STYLE("FontSize",12);
	           LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,50,80,25,"邮发给");
	           LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,300,80,25,"发行员");
			  LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,450,80,25,"出库途径");
			  LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,600,80,25,"编号");
		  }
		  
         //打印一些文字
         function addTitle(offsetTop,address,publisher,sendtype,no,manager,date){
			  LVOAPRINTER.SET_PRINT_STYLE("FontSize",10);
	           LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,110,80,25,address);
	           LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,370,80,25,publisher);
			  LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,530,80,25,sendtype);
			  LVOAPRINTER.ADD_PRINT_TEXT(60+offsetTop,640,80,25,no);
			  
			 LVOAPRINTER.ADD_PRINT_TEXT(220+offsetTop,450,300,25,"签名："+ manager +"  日期："+ date);
             }
             
         //打印期刊明细 有可能多条
         function addMagzine(offsetTop,line,magzineStr){
           	//出库明细循环 间距30
			LVOAPRINTER.ADD_PRINT_TEXT(100 + line * 30 +offsetTop,50,600,25,magzineStr);
           }
               
               
          var LVOAPRINTER=getLVOAPRINTER(document.getElementById('LVOAPRINTER'),document.getElementById('LVOAPRINTER_EM'));
	  
	     if(LVOAPRINTER != null)  {
	          offsetTop = 0;
	          
	         <volist id="vo" name="list">
	              //打印表格
	              addtable(offsetTop);
	              //标题文字
	              addTitle(offsetTop,"{$vo.recAddress}","{$vo.postPeople|get_employee_name}","{$vo.sendGoodsTypeID|get_send_goods_type_name}","{$vo.id}","             ","              ")
	              
	              //期刊目前1条1个表格
	              addMagzine(offsetTop,1,"刊名：{$vo.postCode|get_magazine_name}1  起期：{$vo.beginTermID|get_magazine_terrm_name}   止期：{$vo.endTermID|get_magazine_terrm_name}   份数：{$vo.quantity}" );
	           
	              
	              /*addMagzine(offsetTop+30,1,"刊名：{$vo.postCode|get_magazine_name} 2 起期：{$vo.beginTermID|get_magazine_terrm_name}   止期：{$vo.endTermID|get_magazine_terrm_name}   份数：{$vo.quantity}" );
	              
	              
	              addMagzine(offsetTop+60,1,"刊名：{$vo.postCode|get_magazine_name} 3 起期：{$vo.beginTermID|get_magazine_terrm_name}   止期：{$vo.endTermID|get_magazine_terrm_name}   份数：{$vo.quantity}" );
	            */
	           
	              offsetTop = offsetTop +255;
	          </volist>
	             
			LVOAPRINTER.PRINT_SETUP();
			LVOAPRINTER.PREVIEW();	
			  //     LVOAPRINTER.PRINT();
			 
	    }
</script>
	
</div>

